package com.zyz.G_常用类.BigDecimal;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * @author: vick
 * @Date: 2025/3/19
 * @Description:
 * @version: 1.0
 */
public class Demo2 {
    public static void main(String[] args) {
        BigDecimal num1 = new BigDecimal("10");
        BigDecimal num2 = new BigDecimal("3");

        //除法运算，并且保留2为小数
        BigDecimal result = num1.divide(num2, 2, RoundingMode.HALF_UP);
        System.out.println(result);
    }
}
